#include<stdio.h>
#include<unistd.h>
#include<time.h>
#include<stdlib.h>

int main(void)
{
	int i;
	time_t t1, t2;

	t1 = time(NULL);
	for (i = 0; i < 10; i++)
	{
		t2 = time(NULL);
		sleep(2);
	}
	t2 = time(NULL);

	printf("difftime = %f\n", difftime(t2, t1));

	return 0;
}
